home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / pp / pp-6.0 / Chans / fax / ps250 / error_codes.c next >
Encoding:
C/C++ Source or Header  |  1991-12-18  |  4.1 KB  |  114 lines

  1. /* error_codes.c: error codes for the SystemFax 250 */
  2.  
  3. # ifndef lint
  4. static char Rcsid[] = "@(#)$Header: /xtel/pp/pp-beta/Chans/fax/ps250/RCS/error_codes.c,v 6.0 1991/12/18 20:07:26 jpo Rel $";
  5. # endif
  6.  
  7. /*
  8.  * $Header: /xtel/pp/pp-beta/Chans/fax/ps250/RCS/error_codes.c,v 6.0 1991/12/18 20:07:26 jpo Rel $
  9.  *
  10.  * $Log: error_codes.c,v $
  11.  * Revision 6.0  1991/12/18  20:07:26  jpo
  12.  * Release 6.0
  13.  *
  14.  */
  15. #include "util.h"
  16. #include <isode/cmd_srch.h>
  17.  
  18. CMD_TABLE    fax_errors [] = { /* fax error codes */
  19.     "rcv paper jam (check paper path)",        2,
  20.     "rcv paper path (reset cutter blue wheel)",    4,
  21.     "no recording paper (load paper)",        10,
  22.     "thermal head temp high (reset machine)",    20,
  23.     "tx jam (document edge faulty or ADF requires adjustment see manual", 30,
  24.     "tx jam (document exceeds 1m long check length of original or paper path)", 31,
  25.     "tx guide pulled forward, paper loading door open, or bottom door open", 60,
  26.     "call failed (single go) busy line or wrong no.", 400,
  27.     "line faulty or incompatible fax machine",     402,
  28.     "polling not set up at other end",         403,
  29.     "probable jam at other end",               404,
  30.     "bad line unable to transmit",            405,
  31.     "other end fault (jam, too many errors)",    407,
  32.     "far end has too many errors on rcv'd doc",    408,
  33.     "far end has too many errors on rcv'd doc and voice request required", 409,
  34.     "faulty line",                    410,
  35.     "polling password wrong",            411,
  36.     "paper jam/document too long at far end",    412,
  37.     "polling not on at other fax or code wrong",    414,
  38.     "polling password not correct",            415,
  39.     "faulty line or doc too long at other end",    416,
  40.     "rcv too many errors on document",        417,
  41.     "rcv too many errors on document, other end requests voice request", 418,
  42.     "rcv too many errors on document, your end requests voice request", 419,
  43.     "rcv'd call is not a fax call or line faulty",    420,
  44.     "bad line or non compatible G3 machine",    422,
  45.     "bad line or non compatible G3 machine",    427,
  46.     "bad line retry",                430,
  47.     "bad line retry",                432,
  48.     "paper jam at other end",            436,
  49.     "faulty line",                    451,
  50.     "faulty line or paper jam at other end",    458,
  51.     "faulty line",                    459,
  52.     "faulty line or non standard G2 machine",    464,
  53.     "faulty line or non standard G2 machine",    465,
  54.     "faulty line or non standard G2 machine and paper jam at other end", 466,
  55.     "faulty line or non standard G2 machine",    467,
  56.     "faulty line or non standard G2 machine",    468,
  57.     "paper jam other end or line faulty",        469,
  58.     "faulty line or non standard G2 machine",    473,
  59.     "faulty line or non standard G2 machine",    474,
  60.     "faulty line or non standard G2 machine",    476,
  61.     "faulty line or non standard G2 machine",    478,
  62.     "paper jam other end or line fault",        479,
  63.     "paper jam other end or line fault",        480,
  64.     "line fault",                    481,
  65.     "line fault or machine fault",            483,
  66.     "64 errored lines over error count",        490,
  67.     "line fault or machine fault",            492,
  68.     "paper jam other end or line fault",        493,
  69.     "line fault or paper jam other end",        494,
  70.     "paper jam other end or line fault",        495,
  71.     "line fault",                    540,
  72.     "line fault or other end dropped out",        541,
  73.     "fault other end or line fault",        542,
  74.     "other end fault or line fault",        543,
  75.     "line fault tx not possible",            544,
  76.     "other end fault",                550,
  77.     "other end fault",                552,
  78.     "other fax abnormal end inc. stop button",    553,
  79.     "line fault",                    554,
  80.     "line fault, voice request from other fax",    555,
  81.     "document not on ADF or an auto retry",        623,
  82.     "three dial attempts to one number failed",    630,
  83. #ifdef WHAT_DOCS_SAY
  84.     "info code returned to i/f when dial command fails at each attempt", 693,
  85. #endif
  86.     "dialing attempt failed", 693,
  87.     0,                            -1
  88.     };
  89.  
  90. char    fax_err_buf[BUFSIZ];
  91.  
  92. char    *faxerr2str(err)
  93. int    err;
  94. {
  95.     char    *ret;
  96.  
  97.     if ((ret = rcmd_srch(err, fax_errors)) != NULLCP)
  98.         (void) sprintf(fax_err_buf, "%s", ret);
  99.     else if (err >= 0 && err < 100) 
  100.         (void) sprintf(fax_err_buf, "mechanical problems");
  101.     else if (err >= 400 && err < 500)
  102.         (void) sprintf(fax_err_buf, "communication problems");
  103.     else if (err >= 500 && err < 600)
  104.         (void) sprintf(fax_err_buf, "CCITT error correction mode problems");
  105.     else if (err >= 600 && err < 700)
  106.         (void) sprintf(fax_err_buf, "autodialling problems");
  107.     else
  108.         (void) sprintf(fax_err_buf, "unknown error number '%d'", err);
  109.  
  110.     return fax_err_buf;
  111. }
  112.         
  113.  
  114.